<?php

/**
 * Textcategories filter form base class.
 *
 * @package    briefingPropel
 * @subpackage filter
 * @author     Your name here
 */
abstract class BaseTextcategoriesFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'categoryName'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'textCategoryId'   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'slug'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
    ));

    $this->setValidators(array(
      'categoryName'     => new sfValidatorPass(array('required' => false)),
      'textCategoryId'   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'slug'             => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('textcategories_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Textcategories';
  }

  public function getFields()
  {
    return array(
      'idTextCategories' => 'Number',
      'categoryName'     => 'Text',
      'textCategoryId'   => 'Number',
      'slug'             => 'Text',
    );
  }
}
